package org.erepublik.company.comparators;

import java.util.Comparator;

import org.erepublik.company.product.House;

public class HouseComparatorByWellness implements Comparator<House> {

    @Override
    public int compare(House o1, House o2) {
        double compare = o1.getEfficency() - o2.getEfficency();
        if (compare < 0)
            return 1;
        if (compare > 0)
            return -1;
        return 0;
    }

}
